<template>
  <div class="map-com">
    <div id="container" style="width: 100%;height: 100%"></div>
  </div>
</template>

<script>
  export default {
    name: "MapCom",
    data() {
      return {
        map: null
      }
    },
    methods: {
      initMap() {
        this.map = new AMap.Map("container", {  //设置地图容器id
          viewMode: "3D",    //是否为3D地图模式
          zoom: 19,           //初始化地图级别
          center: [configJson.homePos.lon, configJson.homePos.lat], //初始化地图中心点位置
        });
        window.map = this.map
      }
    },
    mounted() {

    }
  }
</script>

<style scoped>
  .map-com {
    width: 100%;
    height: 100%;
  }

</style>
